import HtmlWebpackPlugin from 'html-webpack-plugin';



module.exports = (webpackConfig) => {
  const htmlWebpackPlugin = new HtmlWebpackPlugin({
    filename: 'index.html',
    template: '!!html!./src/index.html',
    favicon: './favicon.ico',
    hash: true,
    minify: {
      collapseBooleanAttributes: true,
    },
  });

  webpackConfig.plugins.push(htmlWebpackPlugin);
  return webpackConfig;
};
